﻿<Window x:Class="ParsecClient.RaidDps"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:UserControls="clr-namespace:ParsecClient.UserControls"
        Title="RaidDps" Width="250" WindowStyle="None" AllowsTransparency="True" Opacity="1" Topmost="True" ShowInTaskbar="False" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top" ResizeMode="NoResize" SizeToContent="Height" Name="raidDpsWindow">
    <Window.Resources>
        <ResourceDictionary Source="/CustomPopOutResources.xaml" />
    </Window.Resources>
    <Viewbox Name="MyViewBox" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Grid MouseLeftButtonDown="DragWindow" Grid.IsSharedSizeScope="True">
            <Border Style="{StaticResource BackgroundPopoutBorder}" Opacity="1" Margin="10" Name="BorderBackground" />
            <Border Style="{StaticResource BlurPopoutBorder}" Opacity="1" Margin="10" Name="BorderBlur" />
            <Border Style="{StaticResource SolidPopoutBorder}" Opacity="1" Margin="10" Name="BorderSolid" />
            <Border Style="{StaticResource ContentPopoutBorder}" Margin="10" Padding="3" MinWidth="270">
                <StackPanel>
                    <DockPanel LastChildFill="False"  Margin="2 2 2 6">
                        <Button Name="btnIncreaseOpacity" ToolTip="Increase Opacity" Click="btnIncreaseOpacity_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12 M7.5,12 V3"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" ToolTip="Decrease Opacity" Name="btnDecreaseOpacity" Click="btnDecreaseOpacity_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" Grid.Column="2" Name="btnIncreaseSize" ToolTip="Increase Size" Click="btnIncreaseSize_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12 M7.5,12 V3"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" Grid.Column="3" ToolTip="Decrease Size" Name="btnDecreaseSize" Click="btnDecreaseSize_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <TextBlock Style="{StaticResource OverlayTextBlur}" Padding="0" Margin="10 0 0 0" DockPanel.Dock="Left">Raid DPS</TextBlock>
                        <Button Name="btnClose" ToolTip="Close" DockPanel.Dock="Right" Click="btnClose_Click" Style="{StaticResource OverlayButton}">
                            <Path Stroke="#FF4acefe" StrokeThickness="2" Margin="0" Height="17" Width="17">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathGeometry.Figures>
                                            <PathFigure StartPoint="3.5,3.5">
                                                <LineSegment Point="11.5,11.5"/>
                                            </PathFigure>
                                            <PathFigure StartPoint="3.5,11.5">
                                                <LineSegment Point="11.5,3.5"/>
                                            </PathFigure>
                                        </PathGeometry.Figures>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </Button>
                    </DockPanel>
                    <ItemsControl Name="icRaidDps" ItemsSource="{Binding}" MinHeight="200" AlternationCount="2">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Grid Margin="0" x:Name="rowGrid">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="Auto" MinWidth="70" SharedSizeGroup="RaidDpsTotal"/>
                                        <ColumnDefinition Width="Auto" MinWidth="70" SharedSizeGroup="RaidDps"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <TextBlock x:Name="rowLabel" Grid.Column="0" Grid.Row="0" Padding="2 4 0 4" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource OverlayTextBig}" Text="{Binding Path=Name}" ToolTip="Total Damage | DPS"></TextBlock>
                                    <TextBlock x:Name="rowCol1" Grid.Column="1" Grid.Row="0" Padding="10 4 0 4" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource OverlayTextBig}" Text="{Binding Path=DamageOut, StringFormat='{}{0:N0}'}" ToolTip="Total Damage"></TextBlock>
                                    <TextBlock x:Name="rowCol2" Grid.Column="2" Grid.Row="0" Padding="10 4 2 4" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource OverlayTextBig}" Text="{Binding Path=DpsOut, StringFormat='{}{0:N0}'}" ToolTip="DPS"></TextBlock>
                                </Grid>
                                <DataTemplate.Triggers>
                                    <DataTrigger Binding="{Binding Path=ThreatBackgroundValue}" Value="1">
                                        <Setter Property="Style" Value="{StaticResource OverlayRowHighlight}" TargetName="rowGrid"></Setter>
                                    </DataTrigger>
                                </DataTemplate.Triggers>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </StackPanel>
            </Border>
        </Grid>
    </Viewbox>
</Window>
